package week05.HomeWork;

import java.util.Random;

public class GraphicProxy implements Element {
  private Graphic graphic;

  public GraphicProxy(Graphic graphic) {
    this.graphic = graphic;
  }

  @Override
  public void draw() {
    Random random=new Random();
    int a=random.nextInt(100);
    if (a%2==0){
      graphic.draw();
    }else {
      System.out.println("you got a picture with X");
    }
  }
}
